package com.ny.zmb.openapi.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.ny.zmb.openapi.constant.OSSConstant;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

@SpringBootConfiguration
public class OSSConfig {

    @Bean
    public OSS ossClient() {
        return new OSSClientBuilder().build(OSSConstant.endpoint, OSSConstant.accessKeyId, OSSConstant.accessKeySecret);
    }
}
